package com.ludomancy.sos64;


import java.awt.Graphics;
import java.awt.Rectangle;

import com.ludomancy.gamelib.Sound;
import com.ludomancy.gamelib.Widget;

public class MainWidget extends Widget
{
	public WorldWidget world;
	public BriefingWidget brief;
	public EndGameWidget endgame;
	
	public MainWidget(Widget parent, Rectangle area, boolean intro)
	{
		super(parent, area);
		world = new WorldWidget(this, new Rectangle(0,0,getWidth(), getHeight()));
		if(intro)
		{
			brief = new BriefingWidget(world, area);
		}
//		endgame = new EndGameWidget(world, getClientRect());
		
	}
	
	public void startGame()
	{
		brief.close();
		Sound.play("game.wav");
	}
	
	public void endGame()
	{
		endgame = new EndGameWidget(world, getClientRect());
	}
	
	public void paint(Graphics g)
	{
	}
}
